package business.ddz.c2s.cclass;

/*
 * 资阳跑得快宏定义
 * @author zaf
 * **/
public class DDZ_define {

    //安岳跑得快每局游戏状态
    public enum DDZ_GameStatus {
        DDZ_GAME_STATUS_OPENCARD(0), //明牌阶段
        DDZ_GAME_STATUS_SENDCARD(1), //发牌阶段
        DDZ_GAME_STATUS_CONFIRMTHELANDLORD(2), //叫地主阶段
        DDZ_GAME_STATUS_ADDDOUBLE(3), //加倍阶段
        DDZ_GAME_STATUS_COMPARE(4), //比牌阶段
        DDZ_GAME_STATUS_RESULT(5), //结束阶段
        ;

        private int value;

        DDZ_GameStatus(int value) {
            this.value = value;
        }

        public int value() {
            return this.value;
        }

        public static DDZ_GameStatus valueOf(int value) {
            for (DDZ_GameStatus flow : DDZ_GameStatus.values()) {
                if (flow.value == value) {
                    return flow;
                }
            }
            return DDZ_GameStatus.DDZ_GAME_STATUS_SENDCARD;
        }
    }

    //牌类型
    public enum DDZ_CARD_TYPE {
        DDZ_CARD_TYPE_NOMARL(0),            //默认状态，回合开始默认阶段
        DDZ_CARD_TYPE_BUCHU(1),				//不出
        DDZ_CARD_TYPE_SINGLECARD(2), 		//单牌
        DDZ_CARD_TYPE_DUIZI(3),  			//对子
        DDZ_CARD_TYPE_3BUDAI(4),  			//3不带
        DDZ_CARD_TYPE_3DAI1(5),  			//3带1
        DDZ_CARD_TYPE_3DAI2(6),  			//3带2  三张同点牌+一对牌
        DDZ_CARD_TYPE_SHUNZI(7),  			//顺子
        DDZ_CARD_TYPE_LIANDUI(8), 			//联队
        DDZ_CARD_TYPE_4DAI1(9),  			//4带1
        DDZ_CARD_TYPE_4DAI21(10),  			//4带1对
        DDZ_CARD_TYPE_4DAI2(11),  			    //4带2 两个单张
        DDZ_CARD_TYPE_4DAI4(12),  			//4带2 两对
        DDZ_CARD_TYPE_FEIJI0(13),  			//飞机 不带
        DDZ_CARD_TYPE_FEIJI1(14),  			//飞机 三顺带单
        DDZ_CARD_TYPE_FEIJI2(15),  			//飞机 三顺带对
        DDZ_CARD_TYPE_ZHADAN(16),  			//炸弹
        ;
        private int value;

        DDZ_CARD_TYPE(int value) {
            this.value = value;
        }

        public int value() {
            return this.value;
        }

        public static DDZ_CARD_TYPE getGameType(String value) {
            String gameTypeName = value.toUpperCase();
            for (DDZ_CARD_TYPE flow : DDZ_CARD_TYPE.values()) {
                if (flow.toString().equals(gameTypeName)) {
                    return flow;
                }
            }
            return DDZ_CARD_TYPE.DDZ_CARD_TYPE_DUIZI;
        }

        public static DDZ_CARD_TYPE valueOf(int value) {
            for (DDZ_CARD_TYPE flow : DDZ_CARD_TYPE.values()) {
                if (flow.value == value) {
                    return flow;
                }
            }
            return DDZ_CARD_TYPE.DDZ_CARD_TYPE_DUIZI;
        }
    }

    /**
     * 确认地主
     */
    public enum DDZ_ConfirmTheLandlord{
        CONFIRM_THE_LANDLORD_ROB(0),//抢地主
        CONFIRM_THE_LANDLORD_THEBE(1), //叫分
        ;

        private int value;
        private DDZ_ConfirmTheLandlord(int value) {this.value = value;}
        public int value() {return this.value;}

        public static DDZ_ConfirmTheLandlord getConfirmTheLandlord(String value) {
            String gameTypyName = value.toUpperCase();
            for (DDZ_ConfirmTheLandlord flow : DDZ_ConfirmTheLandlord.values()) {
                if (flow.toString().equals(gameTypyName)) {
                    return flow;
                }
            }
            return DDZ_ConfirmTheLandlord.CONFIRM_THE_LANDLORD_ROB;
        }

        public static DDZ_ConfirmTheLandlord valueOf(int value) {
            for (DDZ_ConfirmTheLandlord flow : DDZ_ConfirmTheLandlord.values()) {
                if (flow.value == value) {
                    return flow;
                }
            }
            return DDZ_ConfirmTheLandlord.CONFIRM_THE_LANDLORD_ROB;
        }
    }

    /**
     * 封顶倍数
     */
    public enum DDZ_FengDing{
        FengDing_32(32),//32倍
        FengDing_64(64), //64倍
        FengDing_128(128), //128倍
        FengDing_0(0), //不限制
        ;

        private int value;
        DDZ_FengDing(int value) {this.value = value;}
        public int value() {return this.value;}

        /**
         * 获取封顶倍数
         * @param fengDing
         * @return
         */
        public static int getFengDing(int fengDing) {
            for (DDZ_FengDing flow : DDZ_FengDing.values()) {
                if (flow.ordinal() == fengDing) {
                    return flow.value;
                }
            }
            return 0;
        }
    }

    /**
     * 3带玩法
     */
    public enum DDZ_ThreeZone{
        ThreeZoneWithA(0),//3带1
        ThreeZoneWithPairs(1), //3带一对
        ;

        private int value;
        DDZ_ThreeZone(int value) {this.value = value;}
        public int value() {return this.value;}

    }

    /**
     * 4带玩法
     */
    public enum DDZ_FourZone{
        FourWithTwo(0),//4带2单张
        FourWithTwoPairs(1), //4带2对
        FourWithA(2), //4带1
        FourWithAPairs(3), //4带1对
        ;

        private int value;
        DDZ_FourZone(int value) {this.value = value;}
        public int value() {return this.value;}
    }

    /**
     * 玩法
     */
    public enum DDZ_KeXuanWanFa{
        DisableOpenCard(0),//不能铭牌
        DisAddDouble(1), //不能翻倍
        AutoReady(2), //自动准备
        ZiDongGuoPai(3), //自动过牌
        ShuangWangBiJiao(4), //双王或4个2必叫
        ShangJuXianJiao(5), //上局先出完牌先叫
        DDZ_WANFA_NOTBELOWZERO(6),  	//不能低于0
        DDZ_WANFA_OnlyWinRightNowPoint(7),     //每局带多少
        WuJiPaiQi(8),     //无记牌器
        CoverNotDouble(9),//底牌不翻倍
        ;

        private int value;
        DDZ_KeXuanWanFa(int value) {this.value = value;}
        public int value() {return this.value;}
    }


    public enum DDZGameRoomConfigEnum {
        /**
         * 小局托管解散
         */
        SetAutoJieSan,
        /**
         * 小局2托管解散
         */
        SetAutoJieSan2,
        ;
    }


    /**
     * 高级选项
     *
     * @author Administrator
     */
    public enum GaoJiTypeEnum {
        SAME_IP,//相同IP
        LOCATION,//定位
        NOT_GIFT,// 禁止魔法表情
        LOCATION_200,//200米内不可进
        SECOND_TIMEOUT_30,//30秒踢出
        DISABLE_VOICE,//禁止语音
        FORBIDDEN_WORDS,//禁止文字
        SECOND_TIMEOUT_10,//10秒踢出
        SECOND_TIMEOUT_5,//5秒踢出
    }
}
